/**
 * 
 */
package com.revenco.bi.dao.nutz;

import java.util.List;

import org.nutz.dao.Cnd;
import org.nutz.dao.Condition;
import org.nutz.dao.QueryResult;
import org.nutz.dao.pager.Pager;
import org.springframework.stereotype.Repository;

import com.revenco.bi.dao.TnOthtableMaintableRelaDao;
import com.revenco.bi.model.TnOthtableMaintableRela;

/**
 * @author LingJun
 * @version $Revision:1.0.0, 2014年1月18日 下午12:03:31
 */
@Repository
public class TnOthtableMaintableRelaDaoImpl extends AstractDaoImpl implements
		TnOthtableMaintableRelaDao {
	public List<TnOthtableMaintableRela> getTnOthtableMaintableRelaByColumnId(
			String columnId) {
		Condition condition = Cnd.where("COLUMN_ID", "=", columnId);
		return this.getDao().query(TnOthtableMaintableRela.class, condition);
	}

	public QueryResult getTnOthtableMaintableRelaByColumnId(String columnId,
			Pager pager) {
		Condition condition = Cnd.where("COLUMN_ID", "=", columnId);
		List<TnOthtableMaintableRela> list = this.getDao().query(
				TnOthtableMaintableRela.class, condition, pager);
		pager.setRecordCount(this.getDao().count(TnOthtableMaintableRela.class));
		return new QueryResult(list, pager);
	}

}
